﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DatabaseCore
{
    public class SapDao : ISapDao
    {
        public string GetMaterialNo(string productCode)
        {
            using (var ctx = new ExportDBEntities())
            {
                var materialNo = (from x in ctx.DataProduct
                                  where x.Prod_no_7 == productCode
                                  select x.Prod_no_18).FirstOrDefault();

                return materialNo;
            }
        }

    }
}
